﻿const { Menu, Dropdown, Icon, } = antd;

const menu = (
  <Menu>
    <Menu.Item key="0">
      <a href="http://www.alipay.com/">1st menu item</a>
    </Menu.Item>
    <Menu.Item key="1">
      <a href="http://www.taobao.com/">2nd menu item</a>
    </Menu.Item>
    <Menu.Divider />
    <Menu.Item key="3">3rd menu item</Menu.Item>
  </Menu>
);

class Page extends React.Component {
	onmove =()=>{
		vui.Catch.klect();
	}

    render() {
		const SubMenu = Menu.SubMenu;
    	const menu = (
			<Menu style={{maxHeight:200,overflow:'auto'}}>
			    <Menu.Item key="1">
			      	<a target="_blank" rel="noopener noreferrer" id="menu1_" onClick={function(){
			      		name_.innerText = menu1_.innerText;
			      	}}>支付宝</a>
			    </Menu.Item>
			    <Menu.Item key="2">
			      	<a target="_blank" rel="noopener noreferrer" id="menu2_" onClick={function(){
			      		name_.innerText = menu2_.innerText;
			      	}}>淘宝</a>
			    </Menu.Item>
			    <Menu.Item key="3">
			      	<a target="_blank" rel="noopener noreferrer" id="menu3_" onClick={function(){
			      		name_.innerText = menu3_.innerText;
			      	}}>天猫</a>
			    </Menu.Item>
			    <SubMenu title="外卖" id="qt_parent" name="外卖" key="4">
				    <Menu.Item id="mt" onClick={function(){
				    	name_.innerText = qt_parent.getAttribute("name") + "-" + mt.innerText;
				    }}>美团</Menu.Item>
				    <Menu.Item id="elm" onClick={function(){
				    	name_.innerText = qt_parent.getAttribute("name") + "-" + elm.innerText;
				    }}>饿了么</Menu.Item>
			    </SubMenu>
			    
			    <Menu.Item key="5">
			      	<a target="_blank" rel="noopener noreferrer" id="menu4_" onClick={function(){
			      		name_.innerText = menu4_.innerText;
			      	}}>京东</a>
			    </Menu.Item>
			    <Menu.Item key="6">
			      	<a target="_blank" rel="noopener noreferrer" id="menu5_" onClick={function(){
			      		name_.innerText = menu5_.innerText;
			      	}}>唯品会</a>
			    </Menu.Item>
			    <Menu.Item key="7">
			      	<a target="_blank" rel="noopener noreferrer" id="menu6_" onClick={function(){
			      		name_.innerText = menu6_.innerText;
			      	}}>蘑菇街</a>
			    </Menu.Item>
			    <SubMenu title="支付" id="zf" name="支付" key="8">
				    <Menu.Item id="hb" onClick={function(){
				    	name_.innerText = zf.getAttribute("name") + "-" + hb.innerText;
				    }}>花呗</Menu.Item>
				    <Menu.Item id="jb" onClick={function(){
				    	name_.innerText = zf.getAttribute("name") + "-" + jb.innerText;
				    }}>借呗</Menu.Item>
			    </SubMenu>
			</Menu>
		);
        return (
        	<div className="content_vl" style={{padding:50}}>
	        	<div style={{background:"#fff",padding:30}}>
				    <Dropdown overlay={menu} trigger={['click']}>
				      	<Button style={{ marginLeft: 8 }} style={{marginLeft:30,width:200}}>
				       		<span id="name_" style={{float: 'left',lineHeight: 2}}>点击</span>
				       		<Icon type="down" id="lcon_" style={{float: 'right',marginTop: 8}}/>
				      	</Button>
				    </Dropdown>
			    </div>
		  	</div>
        );
    }
}